﻿using System;

namespace GACore.Structures
{
	public class MarriageProperties
	{
		private SelectionProfiles selectionSchema;
		public SelectionProfiles SelectionSchema
		{
			get { return selectionSchema; }
			set { selectionSchema = value; }
		}

		private SelectionProfiles marriageSchema;
		public SelectionProfiles MarriageSchema
		{
			get { return marriageSchema; }
			set { marriageSchema = value; }
		}

		private int countOfSelectedVectors;
		public int CountOfSelectedVectors
		{
			get { return countOfSelectedVectors; }
			set { countOfSelectedVectors = value; }
		}

		private int[][] marriageProfile;
		public int[][] MarriageProfile
		{
			get { return marriageProfile; }
			set { marriageProfile = value; }
		}

		public MarriageProperties(SelectionProfiles selectionSchema, SelectionProfiles marriageSchema, int countOfSelectedVectors, int[][] marriageProfile = null)
		{
			this.selectionSchema = selectionSchema;
			this.marriageSchema = marriageSchema;
			this.countOfSelectedVectors = countOfSelectedVectors;
			this.marriageProfile = marriageProfile;
			if (marriageProfile != null && countOfSelectedVectors != marriageProfile.GetLength(0))
			{
				throw new ArgumentException("Die Anzahl der selektierten Vektoren muss mit dem Heiratsschema übereinstimmen.");
			}
		}
	}
}
